package bjtuoj;

import java.util.Scanner;

/**
 * ClassName: Homework_2_D
 * Description:
 * date: 2021-10-14 10:20
 *
 * @author liyifan
 */
public class Homework_2_D {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int n = scanner.nextInt();
            long res = 0;
            for (int i = 1;i <=n; i++) {
                res += fun(n, i);
            }
            System.out.print(res + "\n");
        }
    }

    public static long fun(int n, int m){
        if (n == 1)
            return 1;
        if (m == 1 || n == m)
            return 1;
        else
            return fun(n - 1, m - 1) + m * fun(n - 1, m);
    }
}
